# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=radare2-bindings
pkgver=5.2.0
pkgrel=6
pkgdesc='Language bindings of the radare2 api for valabind and friends.'
url='http://radare.org'
arch=('x86_64' 'aarch64')
depends=('radare2' 'python2' 'lua' 'ruby' 'gawk' 'java-environment' 'vala'
         'valabind' 'go-pie')
makedepends=('swig' 'vala' 'valabind')
license=('GPL3')
source=("https://github.com/radare/$pkgname/archive/$pkgver.tar.gz")
sha512sums=('99eaa5eb310d666083980451d9b7f3b5386f40ddacb600f193e801fbdd008bb5a80dfb03545edfbf11f9b21105d87cb186b6933b064d3b579a08a7a23668cf6b')

build() {
  cd "$pkgname-$pkgver"

  ./configure --prefix=/usr --enable=java,python,ctypes,cxx,duktape,guile,php,newlisp,dlang,r2pipe,valac,vapi,ruby

  cd python
  PYTHON_CONFIG=python-config make

  cd ..
  make
}

package() {
  cd "$pkgname-$pkgver"

  make DESTDIR="$pkgdir" install
}

